$(document).on("click",".thumbnail .btn",function(){
	ajax_url($(this).attr('data-href'),'del_div',$(this).attr('data-id'));
});

function ajax_url(url,processer,type){
//根据URL请求数据
	if(confirm("你是否确定？"))
	{
		$.get(url,function(data,status){
			if(status=='success'){
				var dataObj = eval("("+data+")");
				if(dataObj.error==0){
					if (typeof (eval(processer)) != 'function'){
						alert("操作成功！");
					} else {
						eval(processer+'("'+type+'")');
					}
				} else {
					alert(dataObj.message);
				}
			} else {
				alert("操作请求失败，请刷新！");
			}
		});
	}
}

function del_div(type){
	$(".vote"+type).remove();
}